#include <iostream>
#include <cstdlib>
#include <array>

#define DEFAULT_ARRAY_LENGTH 10

int main(){
    using namespace std;
    // 最多输入10个数读入到一个数组中，可以只用array模板类
    std::array<double,DEFAULT_ARRAY_LENGTH> array_double;
    for (size_t i = 0; i < DEFAULT_ARRAY_LENGTH; i++)
    {
        cout << "Pls input 10 double of numbers:";
        std::cin >> array_double[i];
        if (!std::cin.good())
        {
            if (std::cin.eof())
            {
                std::cout << "Terminaled by EOF" << std::endl;
            }else if (std::cin.fail())
            {
                std::cout << "Termianl by FAIL" << std::endl;
            }else{
                std::cout << "Unknown ERROR!" << endl;
                exit(EXIT_FAILURE);
            }
            
        }
        cout << "input success!" << endl;
        
    }
    



    return 0;
}